package entry57;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

public class WrongException {
@Test
public void testSimple() {
	int[] array = new int[] { 1, 2, 3 };
	int i = 0, n = 0;
	try {
		while (true) {
			n += array[i++];
		}
	} catch (ArrayIndexOutOfBoundsException e) {
	}

	assertThat(n, is(6));
}
}